package com.newsee.remote.task;

import com.newsee.remote.ecommerce.service.ICommerceService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author liangzhi.chen
 * @description 科力普定时任务
 * @date 2019/7/23 上午 10:00
 **/
@Component
public class ECommerceColipuTask {

    private final ICommerceService iCommerceService;

    public ECommerceColipuTask(ICommerceService iCommerceService) {
        this.iCommerceService = iCommerceService;
    }

    /**
     * 每天1点开始同步电商商品
     */
    @Scheduled(cron = "0 0 1 * * ?")
    public void syncColipu() {
        iCommerceService.sync();
    }
}
